package com.kdx.wallet.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kdx.wallet.entity.Record;
import com.kdx.wallet.mapper.RecordMapper;
import com.kdx.wallet.mapper.UserMapper;
import com.kdx.wallet.service.RecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RecordServiceImpl extends ServiceImpl<RecordMapper, Record> implements RecordService {

    /**
     * 查询用户交易记录
     */
    @Override
    public List<Record> getTransactionRecords(Integer userId) {
        QueryWrapper<Record> recordWrapper = new QueryWrapper<>();
        recordWrapper.eq("user_id", userId);
        return list(recordWrapper);
    }


}
